package cn.edu.nsmc.modules.sys.dao;

import cn.edu.nsmc.common.utils.R;
import cn.edu.nsmc.modules.sys.entity.SysDepartmentEntity;
import cn.edu.nsmc.modules.sys.form.DepartmentList;
import cn.edu.nsmc.modules.sys.form.req.ReqDepartmentForm;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * @Author ZY
 * @Date 2024/2/19 20:10
 */
@Mapper
public interface SysDepartmentDao extends BaseMapper<SysDepartmentEntity> {
    @Update("update sys_department set name = #{name},memo = #{memo},parent_id = #{parentId} where id = #{id}")
    int  updateDepartment(SysDepartmentEntity sysDepartmentEntity);

    ReqDepartmentForm getDepartmentById(Long id);
    List<ReqDepartmentForm> getDepartmentList(DepartmentList departmentList);
    Integer getDepartmentListNumber(DepartmentList departmentList);
}
